package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.text.Convert;
import com.ruoyi.system.domain.JiajiaJuBao;
import com.ruoyi.system.mapper.JiajiaJuBaoMapper;
import com.ruoyi.system.service.IJiajiaJuBaoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 举报Service业务层处理
 * 
 * @author knd
 * @date 2021-10-14
 */
@Service
public class JiajiaJuBaoServiceImpl implements IJiajiaJuBaoService
{
    @Autowired
    private JiajiaJuBaoMapper jiajiaJuBaoMapper;

    /**
     * 查询举报
     * 
     * @param id 举报主键
     * @return 举报
     */
    @Override
    public JiajiaJuBao selectJiajiaJuBaoById(Long id)
    {
        return jiajiaJuBaoMapper.selectJiajiaJuBaoById(id);
    }

    /**
     * 查询举报列表
     * 
     * @param jiajiaJuBao 举报
     * @return 举报
     */
    @Override
    public List<JiajiaJuBao> selectJiajiaJuBaoList(JiajiaJuBao jiajiaJuBao)
    {
        return jiajiaJuBaoMapper.selectJiajiaJuBaoList(jiajiaJuBao);
    }

    /**
     * 新增举报
     * 
     * @param jiajiaJuBao 举报
     * @return 结果
     */
    @Override
    public int insertJiajiaJuBao(JiajiaJuBao jiajiaJuBao)
    {
        return jiajiaJuBaoMapper.insertJiajiaJuBao(jiajiaJuBao);
    }

    /**
     * 修改举报
     * 
     * @param jiajiaJuBao 举报
     * @return 结果
     */
    @Override
    public int updateJiajiaJuBao(JiajiaJuBao jiajiaJuBao)
    {
        return jiajiaJuBaoMapper.updateJiajiaJuBao(jiajiaJuBao);
    }

    /**
     * 批量删除举报
     * 
     * @param ids 需要删除的举报主键
     * @return 结果
     */
    @Override
    public int deleteJiajiaJuBaoByIds(String ids)
    {
        return jiajiaJuBaoMapper.deleteJiajiaJuBaoByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除举报信息
     * 
     * @param id 举报主键
     * @return 结果
     */
    @Override
    public int deleteJiajiaJuBaoById(Long id)
    {
        return jiajiaJuBaoMapper.deleteJiajiaJuBaoById(id);
    }
}
